﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="corpinfogrid.aspx.cs" Inherits="LTJ.WebPage.SystemManage.corp.corpinfogrid" %>
<%@ Import Namespace="LTJ.Common"%>
<%@ Register TagPrefix="dyj" Namespace="LTJ.Control" Assembly="LTJ.Control" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <title>企业信息列表</title>
    <link href="../css/comm.css" type="text/css" rel="stylesheet" />
    <link href="../css/lightview.css" type="text/css" rel="stylesheet" />
    <script language="javascript" type="text/javascript" src="../js/common.js"></script>
    <script src="../js/jquery.js" type="text/javascript"></script>
    <script src="../js/prototype.js" type="text/javascript"></script>
    <script src="../js/scriptaculous.js?load=effects" type="text/javascript"></script>
    <script src="../js/lightview.js" type="text/javascript"></script>
    <script src="../js/effects.js" type="text/javascript"></script>
    <script type="text/javascript">
        function Check(form, checked) {
            CheckByName(form, 'cid', checked);
            checkedEnabledButton(form, 'cid', 'pause', 'start');
        }
        function formcheck() {
            if (event.keyCode == 13) {
                document.getElementById("check").focus();
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="adnr">
        <fieldset style="border: 1px solid #ccc; margin-bottom: 8px; padding:4px 30px; padding-bottom:10px; text-align:center;">
            <legend id="opt" style="font-weight:bold; line-height:45px; padding-left:60px;background: url(../images/icon/icon19.jpg) no-repeat 6px 50%;">条件检索</legend>
	    <p class="adnrt">
		    企业名：<input onkeydown="formcheck()" name="corpname" class="soon" type="text" style="width:200px;" />
            &nbsp;&nbsp;当前状态：<dyj:DropDownList runat="server" ID="ckstatus">
                <asp:ListItem Text="不限" Value="-1" Selected="True"></asp:ListItem>
                <asp:ListItem Text="启用中" Value="1"></asp:ListItem>
                <asp:ListItem Text="禁用中" Value="0"></asp:ListItem>
            </dyj:DropDownList>
            &nbsp;&nbsp;主营业务类型：<dyj:DropDownList runat="server" ID="ckmain"></dyj:DropDownList>
            &nbsp;&nbsp;<dyj:Button runat="server" ID="check" Text="查询" ButtonImgUrl="../images/search.gif"/>
	    </p>
        </fieldset>
	    <ul class="adnrt mar_top">
            <dyj:Button ID="add" runat="server" Text="新增" ButtonImgUrl="../images/add.gif" OnClientClick="Lightview.show({ href: '../corp/corpinfoedit.aspx?opmode=add', rel: 'iframe', options: { width: 600, height: 700} });return;"/>&nbsp;&nbsp;
		    <dyj:Button ID="pause" runat="server" Text="停用" ButtonImgUrl="../images/del.gif" Enabled="false"/>&nbsp;&nbsp;
            <dyj:Button ID="start" runat="server" Text="启用" Enabled="false"/>
	    </ul>
	    <div class="adnr3">
        <dyj:datagrid id="DataGrid1" runat="server" PageSize="10">
	       <Columns>
            <asp:TemplateColumn HeaderText="<input title='选中/取消' onclick='Check(this.form,this.checked)' type='checkbox' name='chkall' id='chkall' />">
                <HeaderStyle Width="20px" />
                <ItemTemplate>
                    <input id="cid" type="checkbox" onclick="checkedEnabledButton(form, 'cid', 'pause','start')" value="<%# DataBinder.Eval(Container, "DataItem.id").ToString()%>" name="cid">
                </ItemTemplate>
            </asp:TemplateColumn>
            <asp:TemplateColumn HeaderText="操作">
              <ItemTemplate>
                    <a class="l_blue lightview" rel="iframe" title="设置企业超级管理员 :: :: width:600,height:700" href="../user/userauthset.aspx?opmode=setcorpmanager&cid=<%#DataBinder.Eval(Container, "DataItem.id")%>">设置管理员</a>
                    <a class="l_blue lightview" rel="iframe" title=" :: :: width:600,height:700" href="../corp/corpinfoedit.aspx?opmode=edit&cid=<%#DataBinder.Eval(Container, "DataItem.id")%>">编辑</a>
              </ItemTemplate>
            </asp:TemplateColumn>
            <asp:TemplateColumn HeaderText="企业Logo">
              <ItemTemplate>
                    <span id="thepic<%# DataBinder.Eval(Container, "DataItem.id").ToString()%>" onmouseover="showMenu(this.id,0,0,1,0);" style="font-weight:bold"><img src="../images/eye.gif" style="vertical-align:middle" /></span>
                    <div id="thepic<%# DataBinder.Eval(Container, "DataItem.id").ToString()%>_menu" style="display:none">
					    <img src="<%# DataBinder.Eval(Container, "DataItem.logo").ToString()%>" onerror="this.src='../images/common/none.gif'" />
					</div>
              </ItemTemplate>
            </asp:TemplateColumn>
            <asp:BoundColumn DataField="cname" HeaderText="公司名称"></asp:BoundColumn>
	        <asp:BoundColumn DataField="ecname" HeaderText="英文名称"></asp:BoundColumn>
            <asp:BoundColumn DataField="relater" HeaderText="联系人"></asp:BoundColumn>
            <asp:BoundColumn DataField="phone" HeaderText="联系电话"></asp:BoundColumn>
            <asp:BoundColumn DataField="scores" HeaderText="积分"></asp:BoundColumn>
            <asp:BoundColumn DataField="createdate" HeaderText="开通时间"></asp:BoundColumn>
            <asp:TemplateColumn HeaderText="主营业务">
              <ItemTemplate>
                    <%# LTJ.Entity.EnumType.GetMainEnumTypeArray(DataBinder.Eval(Container, "DataItem.main").ToString())%>
              </ItemTemplate>
            </asp:TemplateColumn>
            <asp:BoundColumn DataField="lname" HeaderText="管理员"></asp:BoundColumn>
            <asp:TemplateColumn HeaderText="状态">
              <ItemTemplate>
                    <%# DataBinder.Eval(Container, "DataItem.status").ToString()=="1"?"正常":"停用"%>
              </ItemTemplate>
            </asp:TemplateColumn>
          </Columns>
	    </dyj:datagrid>
	    </div>
	    <i class="tp"></i><i class="bt"></i>
    </div>
    <button id="reclick" runat="server" style="display:none"></button>
    </form>
</body>
</html>
